<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%orderdetail}}".
 *
 * @property integer $id
 * @property integer $order_id
 * @property integer $type
 * @property string $number
 * @property string $unit
 * @property integer $score
 * @property integer $flag
 */
class Orderdetail extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%orderdetail}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [[ 'order_id', 'type', 'number'], 'required'],
            [['id', 'order_id', 'type', 'score', 'flag'], 'integer'],
            [['number'], 'string', 'max' => 11],

        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'order_id' => 'Order ID',
            'type' => 'Type',
            'number' => 'Number',

            'score' => 'Score',
            'flag' => 'Flag',
        ];
    }
}
